import type { RouteRecordRaw } from "vue-router";

const ROUTE_PREFIX = "/afterSale/order"

export const AFTER_SALE_VIEW_Routes = [{
    name: "CreateOrder",
    path: ROUTE_PREFIX + "/create",
    component: () => import("@/views/after_sale/order/CreateView.vue"),
    meta: {
        icon: "Promotion",
        name: "新建售后工单",
        menu: true,
    }
}, {
    name: "UpdateOrder",
    path: ROUTE_PREFIX + "/update",
    component: () => import("@/views/after_sale/order/UpdateView.vue"),
    meta: {
        icon: "Promotion",
        name: "修改售后工单",
        menu: true,
    }
}, {
    name: "OrderDetail",
    path: ROUTE_PREFIX + "/detail",
    component: () => import("@/views/after_sale/order/DetailView.vue"),
    meta: {
        icon: "Promotion",
        name: "售后工单明细",
        menu: true,
    }
}, {
    name: "OrderProductDetail",
    path: ROUTE_PREFIX + "/:orderId/detail",
    component: () => import("@/views/after_sale/order/ProductDetailView.vue"),
    meta: {
        icon: "Promotion",
        name: "售后工单产品明细",
        menu: true,
    }
}] as RouteRecordRaw[]

export default [
    {
        name: "AfterSaleOrder",
        path: ROUTE_PREFIX + "/list",
        component: () => import("@/views/after_sale/order/ListView.vue"),
        meta: {
            icon: "Promotion",
            name: "售后工单管理",
            menu: true,
        }
    }
] 